package com.rmt.www.action;

import java.util.List;

import com.opensymphony.xwork2.ActionSupport;
import com.rmt.www.constant.ArtifactType;
import com.rmt.www.dao.ArtifactDao;
import com.rmt.www.dao.HistoryDao;
import com.rmt.www.dao.ProjectDao;
import com.rmt.www.dao.RequestDao;
import com.rmt.www.dao.TraceabilityDao;
import com.rmt.www.dao.UserDao;
import com.rmt.www.service.AdminReportService;
import com.rmt.www.service.ArtifactDetailQueryService;
import com.rmt.www.vo.Artifact;
import com.rmt.www.vo.DesignArtifact;
import com.rmt.www.vo.FeatureArtifact;
import com.rmt.www.vo.ImplementationArtifact;
import com.rmt.www.vo.Project;
import com.rmt.www.vo.RequirementArtifact;
import com.rmt.www.vo.TestArtifact;
import com.rmt.www.vo.Traceability;

public class ReportAction extends ActionSupport {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private int pid;
	private int index=-1;
	 

	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}

	private AdminReportService adminReportService;
	private List<FeatureArtifact> featureList;
	private List<RequirementArtifact> requirementList;
	private List<DesignArtifact> designList;
	private List<ImplementationArtifact> implementationList;
	private List<TestArtifact> testcaseList;
	private Project project;
	private ArtifactDetailQueryService artifactDetailQueryService;
	public ArtifactDetailQueryService getArtifactDetailQueryService() {
		return artifactDetailQueryService;
	}

	public void setArtifactDetailQueryService(
			ArtifactDetailQueryService artifactDetailQueryService) {
		this.artifactDetailQueryService = artifactDetailQueryService;
	}

	public String execute() {
		featureList = artifactDetailQueryService.getFeatureList(pid);
		requirementList = artifactDetailQueryService.getRequirementList(pid);
		designList = artifactDetailQueryService.getDesignList(pid);
		implementationList = artifactDetailQueryService.getImplementationList(pid);
		testcaseList = artifactDetailQueryService.getTestCaseList(pid);
		project = adminReportService.getProject(pid);
		return "success";
	}
	
	public List<FeatureArtifact> getFeatureList() {
		return featureList;
	}
	public void setFeatureList(List<FeatureArtifact> featureList) {
		this.featureList = featureList;
	}
	public List<RequirementArtifact> getRequirementList() {
		return requirementList;
	}
	public void setRequirementList(List<RequirementArtifact> requirementList) {
		this.requirementList = requirementList;
	}
	public List<DesignArtifact> getDesignList() {
		return designList;
	}
	public void setDesignList(List<DesignArtifact> designList) {
		this.designList = designList;
	}
	public List<ImplementationArtifact> getImplementationList() {
		return implementationList;
	}
	public void setImplementationList(List<ImplementationArtifact> implementationList) {
		this.implementationList = implementationList;
	}
	public List<TestArtifact> getTestcaseList() {
		return testcaseList;
	}
	public void setTestcaseList(List<TestArtifact> testcaseList) {
		this.testcaseList = testcaseList;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	public int getPid() {
		return pid;
	}
	public void setPid(int pid) {
		this.pid = pid;
	}
	public Project getProject() {
		return project;
	}
	public void setProject(Project project) {
		this.project = project;
	}

	public AdminReportService getAdminReportService() {
		return adminReportService;
	}

	public void setAdminReportService(AdminReportService adminReportService) {
		this.adminReportService = adminReportService;
	}
	
}
